import psycopg2
conn = psycopg2.connect(
    dbname="nmg_info",
    user="your_username",
    password="your_password",
    host="localhost",
    port="5432"
)
print("数据库连接正常！")
conn.close()
